package com.tiza.xiaoyoubao.ui.fragment;

import android.os.Bundle;

import com.orhanobut.hawk.Hawk;
import com.tianze.library.base.BaseFragment;
import com.tianze.library.view.SimpleDialog;
import com.tiza.xiaoyoubao.R;
import com.tiza.xiaoyoubao.app.Constants;
import com.tiza.xiaoyoubao.app.UIHelper;
import com.tiza.xiaoyoubao.entity.DnTBTaskOrderInfo;
import com.tiza.xiaoyoubao.entity.MpJDTaskOrderInfo;


public class MpJDOperateFragment extends BaseFragment  {
    MpJDTaskOrderInfo  mOrderInfo = Hawk.get(Constants.KEY_MPJDTASKOEDER_INFO, (MpJDTaskOrderInfo) null);
    @Override
    protected int getLayoutId() {
        return R.layout.fragment_operation_task_mp_jd;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {

    }
    @Override
    public boolean onBackPressed() {
        showCustomConfirmDialog("返回后台后将不保存所做操作，下次需要重新上传截图哦，确定要返回吗", "确定", "取消",
                                new SimpleDialog.OnSimpleClickListener() {
                                    @Override
                                    public void onClick(SimpleDialog simpleDialog) {
                                        Bundle args = new Bundle();
                                        args.putSerializable("info", mOrderInfo);
                                        args.putString("state", "orderTask");
                                        UIHelper.showMpJDTask2(mActivity,args);
                                        simpleDialog.dismiss();
                                    }
                                }, new SimpleDialog.OnSimpleClickListener() {
                    @Override
                    public void onClick(SimpleDialog simpleDialog) {
                        simpleDialog.dismiss();
                    }
                }
        );
        return true;
    }
}
